Xtend IVR scripting language supports the following operators.
Assigns value to a variable.
Syntax
result = expression
Eg:
$A = 2.56
$A = $B
$A = "This is a test"
$A += 2
$A += $B
$A -= 2
$A -= $B
Used to perform arithmetic operations.
Syntax
result = operand1 < operator > operand2
Parameters
operand 1 : First operand to perform arithmetic operation.
operand 2 : Second operand to perform arithmetic operation.
Operands can be integer, floating point, constants, or variables. Xtend IVR supports both simple and complex arithmetic operations. Following are the arithmetic operators in Xtend IVR:
Used to find the sum of two numbers.
Eg:
$A = $A + 2
$A = $A + $B
Used to find the difference between two numbers or to indicate the negative value of a numeric expression.
Eg:
$A = $A - 2.5
$A = $A - $B
Used to multiply two numbers.
Eg:
$A = $A * 2.5
$A = $A * $B
Used to divide two numbers.
Eg:
$A = $A / 2
$A = $A / $B
Used to find the remainder after the division operation and returns an integer result.
Eg:
$A = $A % 2
$A = $A % $B
Syntax
operand1 < operator > operand2
Operands can be integer, floating point, constants or variables. Description of the operators and their examples are listed as follows:
The comparison operator '=' is also used as an assignment operator. This ambiguity is automatically resolved by the parser depending on the context of their use.
Syntax
operand1 < operator > operand2
Bitwise operators supported by Xtend IVR and their descriptions are:
Syntax
expression1 < operator > expression2
Logical operators supported by Xtend IVR and their descriptions are: